<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>属性管理</title>
    <script type='text/javascript' src='http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://127.0.0.1/damai/hdphp/hdphp/../hdjs/css/hdjs.css' rel='stylesheet' media='screen'>
<script src='http://127.0.0.1/damai/hdphp/hdphp/../hdjs/js/hdjs.js'></script>
<script src='http://127.0.0.1/damai/hdphp/hdphp/../hdjs/js/slide.js'></script>
<script src='http://127.0.0.1/damai/hdphp/hdphp/../hdjs/org/cal/lhgcalendar.min.js'></script>
<script type='text/javascript'>
HOST = '<?php echo $GLOBALS['user']['HOST'];?>';
ROOT = '<?php echo $GLOBALS['user']['ROOT'];?>';
WEB = '<?php echo $GLOBALS['user']['WEB'];?>';
URL = '<?php echo $GLOBALS['user']['URL'];?>';
HDPHP = '<?php echo $GLOBALS['user']['HDPHP'];?>';
HDPHPDATA = '<?php echo $GLOBALS['user']['HDPHPDATA'];?>';
HDPHPTPL = '<?php echo $GLOBALS['user']['HDPHPTPL'];?>';
HDPHPEXTEND = '<?php echo $GLOBALS['user']['HDPHPEXTEND'];?>';
APP = '<?php echo $GLOBALS['user']['APP'];?>';
CONTROL = '<?php echo $GLOBALS['user']['CONTROL'];?>';
METH = '<?php echo $GLOBALS['user']['METH'];?>';
GROUP = '<?php echo $GLOBALS['user']['GROUP'];?>';
TPL = '<?php echo $GLOBALS['user']['TPL'];?>';
CONTROLTPL = '<?php echo $GLOBALS['user']['CONTROLTPL'];?>';
STATIC = '<?php echo $GLOBALS['user']['STATIC'];?>';
PUBLIC = '<?php echo $GLOBALS['user']['PUBLIC'];?>';
HISTORY = '<?php echo $GLOBALS['user']['HISTORY'];?>';
HTTPREFERER = '<?php echo $GLOBALS['user']['HTTPREFERER'];?>';
</script>
    <link href='http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/css/bootstrap.min.css' rel='stylesheet' media='screen'>
<script src='http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/js/bootstrap.min.js'></script>
                <!--[if lte IE 6]>
                <link rel="stylesheet" type="text/css" href="http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/ie6/css/bootstrap-ie6.css">
                <![endif]-->
                <!--[if lt IE 9]>
                <script src="http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/js/html5shiv.min.js"></script>
                <script src="http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/js/respond.min.js"></script>
                <![endif]-->
    <style type="text/css">
        /*修改按钮*/
       .table2 tr td{
            height: 35px;
        }
        input[type="text"]{
            background-color: #FFFFFF;
            border: 2px solid #DDDDDD;
            border-radius: 0;
            box-shadow: 2px 2px 2px #F0F0F0 inset !important;
            color: #555555;
            display: inline-block;
            font-size: 12px;
            line-height: 30px;
            margin: 0;
            padding: 0 6px;
            vertical-align: middle;
            height: 30px;
        }
        input[type="text"]:focus{
            background: none repeat scroll 0 0 #FFFBDE;
            border: 2px solid #51B4FF;
            box-shadow: none !important;
            outline: 1px solid #51B4FF;
            
        }
    </style>
    <link type="text/css" rel="stylesheet" href="http://127.0.0.1/damai/Static/css/common.css"/>
    <script type="text/javascript" src="http://127.0.0.1/damai/./App/App/Admin/Tpl/Type/js/js.js"></script>
</head>
<body>
<div class="wrap">
    <table class="table2">
        <thead>
        <tr>
            <td width="30">id</td>
            <td width="100">属性名</td>
            <td width="100">种类</td>
               <td width="100">属性值/规格</td>
            <td width="200">操作</td>
        </tr>
        </thead>
        <tbody>
            <?php if(is_array($attrData)):?><?php  foreach($attrData as $v){ ?>
                <tr>
                    <td width="50"><?php echo $v['attrid'];?></td>
                    <td width="50"><?php echo $v['attrname'];?></td>
                    <?php if($v['is_type'] == 0){?>
                    <td width="50">属性</td>
                    <?php  }elseif($v['is_type'] == 2){ ?>
                    <td width="50">支持</td>
                    <?php  }elseif($v['is_type'] == 3){ ?>
                    <td width="50">城市</td>

                    <?php  }else{ ?>
                    <td width="50">规格</td>
                    <?php }?>
                    <td width="200">
                        <span><?php echo $v['attrvalue'];?></span>
                        
                        <form action="<?php echo U('Type/edit_attr',array('typeid'=>$v['typeid']));?>" style="display:none" method="post">
                            <input type="text" name="attrvalue" id="" value="<?php echo $v['attrvalue'];?>"/>
                            <input type="hidden" name="attrid" value="<?php echo $v['attrid'];?>"/>
                        </form>
                    </td>
                    <td width="300">
                        <a href="javascript:;" class="btn btn-info btn-xs edit-tag">编辑
                        </a>&nbsp;<a href="javascript:;" class="btn btn-danger btn-xs" onclick="if(confirm('你确认删除吗？')) location.href='<?php echo U('Type/del_attr',array('attrid'=>$v['attrid']));?>'">删除</a>
                    </td>
                </tr>
            <?php }?><?php endif;?>
        </tbody>
    </table>
    <div class="page_hdjob">
        
    </div>
</div>

</body>
</html>


